import { Component } from '@angular/core';
import { NavController,NavParams } from 'ionic-angular';
import { GetBgPicService } from '../../../../app/get-bg-pic.service'
declare var $:any;

@Component({
    selector: 'page-drowing-board',
    templateUrl: 'drowing-board.html',
    providers: [GetBgPicService]
})   
export class DrowingBoardPage {
    //选取的背景图
    private bgPicUrl:string;
    private isShowColorBoard = "none";
    

    constructor(public navCtrl: NavController,public navParams: NavParams, private getBgPicService:GetBgPicService){
        var ww : number= 0
        if(screen.width==320){
            ww = 0 
        }else if(screen.width>320 && screen.width<=375){
            ww = 1
        }else if(screen.width>375 && screen.width<=414){
            ww = 2
        }
        this.bgPicUrl = getBgPicService.getPictures(navParams.data.title,ww,navParams.data.a)
    }

  //关闭调色板
  onclosePallet(): void {
    this.isShowColorBoard = "none";
  }

  showPallet(): void {
    this.isShowColorBoard = "block";
  }
    
    
}
